package com.bigshen.demo.annotation.weavecomponents.a0applicationcontext;

import com.bigshen.demo.project.service.CommonService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyTest {

    @Test
    public void test() {

        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);

        CommonService commonService = (CommonService) applicationContext.getBean("commonService");

        System.out.println(commonService);

        commonService.printlnAllBeanNames();

    }

}
